<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.9.0">
    

    

    



    <meta charset="utf-8">
    
    
    
    <title>openlayers加载ArcGIS自定坐标切片服务 | 奔跑的蜗牛 | 虚心若愚</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#3F51B5">
    
    
    <meta name="keywords" content="gis,openlayers">
    <meta name="description" content="openlayers加载ArcGIS自定坐标切片服务一、概述在实际的WebGIS开发中我们通常遇到的是WGS84的web 墨卡托投影及其经纬度投影，对应的SRID为EPSG:3857及EPSG:4326。但是由于实际的使用需求，我们通常回遇到一些北京54、西安80以及一些地方坐标系发布的地图服务，如果对于坐标系的理解不够深入，通常大费周章，不得其解。 现在利用这边文章，整理一下在自定义坐标系或者非">
<meta name="keywords" content="gis,openlayers">
<meta property="og:type" content="article">
<meta property="og:title" content="openlayers加载ArcGIS自定坐标切片服务">
<meta property="og:url" content="http://windynature.oschina.io/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/index.html">
<meta property="og:site_name" content="奔跑的蜗牛">
<meta property="og:description" content="openlayers加载ArcGIS自定坐标切片服务一、概述在实际的WebGIS开发中我们通常遇到的是WGS84的web 墨卡托投影及其经纬度投影，对应的SRID为EPSG:3857及EPSG:4326。但是由于实际的使用需求，我们通常回遇到一些北京54、西安80以及一些地方坐标系发布的地图服务，如果对于坐标系的理解不够深入，通常大费周章，不得其解。 现在利用这边文章，整理一下在自定义坐标系或者非">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="http://windynature.oschina.io/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/行政区域.png">
<meta property="og:image" content="http://windynature.oschina.io/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/切片菜单.png">
<meta property="og:image" content="http://windynature.oschina.io/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/共享为服务.png">
<meta property="og:image" content="http://windynature.oschina.io/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/发布服务.png">
<meta property="og:image" content="http://windynature.oschina.io/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/选择server对应文件夹.png">
<meta property="og:image" content="http://windynature.oschina.io/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/比例尺设置.png">
<meta property="og:image" content="http://windynature.oschina.io/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/抗锯齿.png">
<meta property="og:image" content="http://windynature.oschina.io/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/选择png.png">
<meta property="og:image" content="http://windynature.oschina.io/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/切片-高级设置.png">
<meta property="og:image" content="http://windynature.oschina.io/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/发布后的服务.png">
<meta property="og:image" content="http://windynature.oschina.io/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/服务信息.png">
<meta property="og:image" content="http://windynature.oschina.io/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/服务信息json.png">
<meta property="og:image" content="http://windynature.oschina.io/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/切片信息json.png">
<meta property="og:updated_time" content="2020-03-18T05:51:05.513Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="openlayers加载ArcGIS自定坐标切片服务">
<meta name="twitter:description" content="openlayers加载ArcGIS自定坐标切片服务一、概述在实际的WebGIS开发中我们通常遇到的是WGS84的web 墨卡托投影及其经纬度投影，对应的SRID为EPSG:3857及EPSG:4326。但是由于实际的使用需求，我们通常回遇到一些北京54、西安80以及一些地方坐标系发布的地图服务，如果对于坐标系的理解不够深入，通常大费周章，不得其解。 现在利用这边文章，整理一下在自定义坐标系或者非">
<meta name="twitter:image" content="http://windynature.oschina.io/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/行政区域.png">
    
        <link rel="alternative" href="/atom.xml" title="奔跑的蜗牛" type="application/atom+xml">
    
    <link rel="shortcut icon" href="/blog/favicon.ico">
    <link rel="stylesheet" href="//unpkg.com/hexo-theme-material-indigo@1.5.2/css/style.css">
    <script>window.lazyScripts=[]</script>
</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu" class="hide" >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/blog/img/timg.jpg)">
      <div class="brand">
        <a href="/blog/" class="avatar waves-effect waves-circle waves-light">
          <img src="/blog/img/user2.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">windy</h5>
          <a href="mailto:windynature@163.com" title="windynature@163.com" class="mail">windynature@163.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/blog/"  >
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/blog/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                归档
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/blog/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                标签
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/blog/categories"  >
                <i class="icon icon-lg icon-th-list"></i>
                分类
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://github.com/WindyNature" target="_blank" >
                <i class="icon icon-lg icon-github"></i>
                Github
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://git.oschina.net/windynature" target="_blank" >
                <i class="icon icon-lg icon-mayun"></i>
                码云
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">openlayers加载ArcGIS自定坐标切片服务</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header post-header">

    <div class="container fade-scale">
        <h1 class="title">openlayers加载ArcGIS自定坐标切片服务</h1>
        <h5 class="subtitle">
            
                <time datetime="2020-03-18T05:37:37.975Z" itemprop="datePublished" class="page-time">
  2020-03-18
</time>


	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/blog/categories/openlayers/">openlayers</a></li></ul>

            
        </h5>
    </div>

    

</header>


<div class="container body-wrap">
    
    <aside class="post-widget">
        <nav class="post-toc-wrap" id="post-toc">
            <h4>TOC</h4>
            <ol class="post-toc"><li class="post-toc-item post-toc-level-1"><a class="post-toc-link" href="#openlayers加载ArcGIS自定坐标切片服务"><span class="post-toc-text">openlayers加载ArcGIS自定坐标切片服务</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#一、概述"><span class="post-toc-text">一、概述</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#二、使用到的库"><span class="post-toc-text">二、使用到的库</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#三、主要步骤"><span class="post-toc-text">三、主要步骤</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#3-1-ArcGIS发布服务"><span class="post-toc-text">3.1 ArcGIS发布服务</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#3-1-1-数据准备"><span class="post-toc-text">3.1.1 数据准备</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#3-1-2-切片服务流程"><span class="post-toc-text">3.1.2 切片服务流程</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#1-选择切片方式"><span class="post-toc-text">1. 选择切片方式</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#2-发布服务"><span class="post-toc-text">2. 发布服务</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#3-填写服务名称"><span class="post-toc-text">3.填写服务名称</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#4-选择路径"><span class="post-toc-text">4.选择路径</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#5-填写服务参数"><span class="post-toc-text">5. 填写服务参数</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#6-抗锯齿"><span class="post-toc-text">6. 抗锯齿</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#7-png设置"><span class="post-toc-text">7.png设置</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#8-切片等级"><span class="post-toc-text">8.切片等级</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#9-发布后的服务"><span class="post-toc-text">9.发布后的服务</span></a></li></ol></li></ol></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#3-2服务参数详解"><span class="post-toc-text">3.2服务参数详解</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#3-2-1-服务信息"><span class="post-toc-text">3.2.1 服务信息</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#3-2-2-服务信息json格式"><span class="post-toc-text">3.2.2 服务信息json格式</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#3-3-3-切片信息"><span class="post-toc-text">3.3.3 切片信息</span></a></li></ol></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#3-3-openlayers-XYZ方式访问ArcGIS的MapServer服务"><span class="post-toc-text">3.3 openlayers XYZ方式访问ArcGIS的MapServer服务</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#3-4-利用proj4扩展openlayers的投影"><span class="post-toc-text">3.4 利用proj4扩展openlayers的投影</span></a></li></ol></li></ol></li></ol>
        </nav>
    </aside>
    
<article id="post-openlayers/openlayers加载ArcGIS自定义坐标系切片服务"
  class="post-article article-type-post fade" itemprop="blogPost">

    <div class="post-card">
        <h1 class="post-card-title">openlayers加载ArcGIS自定坐标切片服务</h1>
        <div class="post-meta">
            <time class="post-time" title="2020年03月18日 13:37" datetime="2020-03-18T05:37:37.975Z"  itemprop="datePublished">2020-03-18</time>

            
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/blog/categories/openlayers/">openlayers</a></li></ul>



            
<span id="busuanzi_container_page_pv" title="文章总阅读量" style='display:none'>
    <i class="icon icon-eye icon-pr"></i><span id="busuanzi_value_page_pv"></span>
</span>


            

        </div>
        <div class="post-content" id="post-content" itemprop="postContent">
            <h1 id="openlayers加载ArcGIS自定坐标切片服务"><a href="#openlayers加载ArcGIS自定坐标切片服务" class="headerlink" title="openlayers加载ArcGIS自定坐标切片服务"></a>openlayers加载ArcGIS自定坐标切片服务</h1><h2 id="一、概述"><a href="#一、概述" class="headerlink" title="一、概述"></a>一、概述</h2><p>在实际的WebGIS开发中我们通常遇到的是<code>WGS84</code>的<code>web 墨卡托投影</code>及其经纬度投影，对应的SRID为<code>EPSG:3857</code>及<code>EPSG:4326</code>。但是由于实际的使用需求，我们通常回遇到一些北京54、西安80以及一些地方坐标系发布的地图服务，如果对于坐标系的理解不够深入，通常大费周章，不得其解。</p>
<p>现在利用这边文章，整理一下在自定义坐标系或者非<code>EPSG:3857</code> 、<code>EPSG:4326</code> 坐标系ArcGIS切片服务的访问。对于坐标系的总结，详见坐标系总结一文。</p>
<h2 id="二、使用到的库"><a href="#二、使用到的库" class="headerlink" title="二、使用到的库"></a>二、使用到的库</h2><ul>
<li>openlayers ：WebGIS javascript 类库</li>
<li>proj4js：一个免费的坐标转换工具库</li>
</ul>
<h2 id="三、主要步骤"><a href="#三、主要步骤" class="headerlink" title="三、主要步骤"></a>三、主要步骤</h2><h3 id="3-1-ArcGIS发布服务"><a href="#3-1-ArcGIS发布服务" class="headerlink" title="3.1 ArcGIS发布服务"></a>3.1 ArcGIS发布服务</h3><h4 id="3-1-1-数据准备"><a href="#3-1-1-数据准备" class="headerlink" title="3.1.1 数据准备"></a>3.1.1 数据准备</h4><p>准备一份自定义坐标系数据，例如重庆区域的行政区域。</p>
<figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/行政区域.png" alt="1555638149521" title>
                </div>
                <div class="image-caption">1555638149521</div>
            </figure>

<h4 id="3-1-2-切片服务流程"><a href="#3-1-2-切片服务流程" class="headerlink" title="3.1.2 切片服务流程"></a>3.1.2 切片服务流程</h4><h5 id="1-选择切片方式"><a href="#1-选择切片方式" class="headerlink" title="1. 选择切片方式"></a>1. 选择切片方式</h5><figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/切片菜单.png" alt="共享为服务" title>
                </div>
                <div class="image-caption">共享为服务</div>
            </figure>

<p>这里共享有两种方式：</p>
<ul>
<li>地图包：改方式切片为本地包，可转移到web容器进行访问</li>
<li>服务：该方式通过arcgis server发布</li>
</ul>
<h5 id="2-发布服务"><a href="#2-发布服务" class="headerlink" title="2. 发布服务"></a>2. 发布服务</h5><figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/共享为服务.png" alt="发布服务" title>
                </div>
                <div class="image-caption">发布服务</div>
            </figure>

<h5 id="3-填写服务名称"><a href="#3-填写服务名称" class="headerlink" title="3.填写服务名称"></a>3.填写服务名称</h5><figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/发布服务.png" alt="服务名称" title>
                </div>
                <div class="image-caption">服务名称</div>
            </figure>

<h5 id="4-选择路径"><a href="#4-选择路径" class="headerlink" title="4.选择路径"></a>4.选择路径</h5><figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/选择server对应文件夹.png" alt="选择路径" title>
                </div>
                <div class="image-caption">选择路径</div>
            </figure>

<h5 id="5-填写服务参数"><a href="#5-填写服务参数" class="headerlink" title="5. 填写服务参数"></a>5. 填写服务参数</h5><figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/比例尺设置.png" alt="服务参数" title>
                </div>
                <div class="image-caption">服务参数</div>
            </figure>

<h5 id="6-抗锯齿"><a href="#6-抗锯齿" class="headerlink" title="6. 抗锯齿"></a>6. 抗锯齿</h5><figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/抗锯齿.png" alt="抗锯齿" title>
                </div>
                <div class="image-caption">抗锯齿</div>
            </figure>

<h5 id="7-png设置"><a href="#7-png设置" class="headerlink" title="7.png设置"></a>7.png设置</h5><figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/选择png.png" alt="png" title>
                </div>
                <div class="image-caption">png</div>
            </figure>

<h5 id="8-切片等级"><a href="#8-切片等级" class="headerlink" title="8.切片等级"></a>8.切片等级</h5><figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/切片-高级设置.png" alt="切片等级" title>
                </div>
                <div class="image-caption">切片等级</div>
            </figure>

<h5 id="9-发布后的服务"><a href="#9-发布后的服务" class="headerlink" title="9.发布后的服务"></a>9.发布后的服务</h5><figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/发布后的服务.png" alt title>
                </div>
                <div class="image-caption"></div>
            </figure>

<h3 id="3-2服务参数详解"><a href="#3-2服务参数详解" class="headerlink" title="3.2服务参数详解"></a>3.2服务参数详解</h3><h4 id="3-2-1-服务信息"><a href="#3-2-1-服务信息" class="headerlink" title="3.2.1 服务信息"></a>3.2.1 服务信息</h4><figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/服务信息.png" alt="服务信息" title>
                </div>
                <div class="image-caption">服务信息</div>
            </figure>

<h4 id="3-2-2-服务信息json格式"><a href="#3-2-2-服务信息json格式" class="headerlink" title="3.2.2 服务信息json格式"></a>3.2.2 服务信息json格式</h4><p>参数：f=json</p>
<figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/服务信息json.png" alt="服务信息json格式" title>
                </div>
                <div class="image-caption">服务信息json格式</div>
            </figure>

<h4 id="3-3-3-切片信息"><a href="#3-3-3-切片信息" class="headerlink" title="3.3.3 切片信息"></a>3.3.3 切片信息</h4><p>对于使用<code>openlayers</code>的方式访问ArcGIS Server发布的rest切片服务，</p>
<figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/切片信息json.png" alt="切片信息" title>
                </div>
                <div class="image-caption">切片信息</div>
            </figure>

<h3 id="3-3-openlayers-XYZ方式访问ArcGIS的MapServer服务"><a href="#3-3-openlayers-XYZ方式访问ArcGIS的MapServer服务" class="headerlink" title="3.3 openlayers XYZ方式访问ArcGIS的MapServer服务"></a>3.3 openlayers XYZ方式访问ArcGIS的MapServer服务</h3><p>3.3.1 设置投影</p>
<figure class="highlight javascript"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment">       * 添加投影</span></span><br><span class="line"><span class="comment">       **/</span></span><br><span class="line">      <span class="function"><span class="keyword">function</span> <span class="title">addProjection</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line">          <span class="comment">//定义坐标系</span></span><br><span class="line">          <span class="comment">// 投影名称，投影参数</span></span><br><span class="line">          proj4.defs(<span class="string">'projectionName'</span>, <span class="string">'XXXXXX'</span>);</span><br><span class="line"></span><br><span class="line">          <span class="comment">//将proj4注册到ol,使其具有坐标变化功能</span></span><br><span class="line">          ol.proj.setProj4(proj4);</span><br><span class="line"></span><br><span class="line">          <span class="comment">//定义转换</span></span><br><span class="line">          ol.proj.addCoordinateTransforms(<span class="string">"EPSG:4326"</span>, <span class="string">"projectionName"</span>,</span><br><span class="line">              <span class="function"><span class="keyword">function</span> (<span class="params">coordinate</span>) </span>&#123;</span><br><span class="line">                  <span class="keyword">return</span> proj4(<span class="string">"EPSG:4326"</span>, <span class="string">"projectionName"</span>, coordinate);</span><br><span class="line">              &#125;,</span><br><span class="line">              <span class="function"><span class="keyword">function</span> (<span class="params">coordinate</span>) </span>&#123;</span><br><span class="line">                  <span class="keyword">return</span> proj4(<span class="string">"projectionName"</span>, <span class="string">"EPSG:4326"</span>, coordinate);;</span><br><span class="line">              &#125;</span><br><span class="line">          );</span><br><span class="line"></span><br><span class="line">          ol.proj.addCoordinateTransforms(<span class="string">"EPSG:3857"</span>, <span class="string">"projectionName"</span>,</span><br><span class="line">              <span class="function"><span class="keyword">function</span> (<span class="params">coordinate</span>) </span>&#123;</span><br><span class="line">                  <span class="keyword">return</span> proj4(<span class="string">"EPSG:3857"</span>, <span class="string">"projectionName"</span>, coordinate);</span><br><span class="line">              &#125;,</span><br><span class="line">              <span class="function"><span class="keyword">function</span> (<span class="params">coordinate</span>) </span>&#123;</span><br><span class="line">                  <span class="keyword">return</span> proj4(<span class="string">"projectionName"</span>, <span class="string">"EPSG:3857"</span>, coordinate);;</span><br><span class="line">              &#125;</span><br><span class="line">          );</span><br><span class="line">      &#125;</span><br></pre></td></tr></table></figure>

<h3 id="3-4-利用proj4扩展openlayers的投影"><a href="#3-4-利用proj4扩展openlayers的投影" class="headerlink" title="3.4 利用proj4扩展openlayers的投影"></a>3.4 利用proj4扩展openlayers的投影</h3>
        </div>

        <blockquote class="post-copyright">
    <div class="content">
        
<span class="post-time">
    最后更新时间：<time datetime="2020-03-18T05:51:05.513Z" itemprop="dateUpdated">2020年3月18日 13:51</time>
</span><br>


        这里写留言或版权声明：<a href="/blog/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/" target="_blank" rel="external">http://windynature.oschina.io/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/</a>
    </div>
    <footer>
        <a href="http://windynature.oschina.io">
            <img src="/blog/img/user2.jpg" alt="windy">
            windy
        </a>
    </footer>
</blockquote>

        


        <div class="post-footer">
            
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog/tags/gis/">gis</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog/tags/openlayers/">openlayers</a></li></ul>


            
<div class="page-share-wrap">
    

<div class="page-share" id="pageShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://windynature.oschina.io/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/&title=《openlayers加载ArcGIS自定坐标切片服务》 — 奔跑的蜗牛&pic=http://windynature.oschina.io/img/user2.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://windynature.oschina.io/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/&title=《openlayers加载ArcGIS自定坐标切片服务》 — 奔跑的蜗牛&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://windynature.oschina.io/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《openlayers加载ArcGIS自定坐标切片服务》 — 奔跑的蜗牛&url=http://windynature.oschina.io/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/&via=http://windynature.oschina.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://windynature.oschina.io/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>



    <a href="javascript:;" id="shareFab" class="page-share-fab waves-effect waves-circle">
        <i class="icon icon-share-alt icon-lg"></i>
    </a>
</div>



        </div>
    </div>

    
<nav class="post-nav flex-row flex-justify-between">
  
    <div class="waves-block waves-effect prev">
      <a href="/blog/2020/03/18/openlayers/openlayers样式渲染/" id="post-prev" class="post-nav-link">
        <div class="tips"><i class="icon icon-angle-left icon-lg icon-pr"></i> Prev</div>
        <h4 class="title">openlayers 样式渲染</h4>
      </a>
    </div>
  

  
    <div class="waves-block waves-effect next">
      <a href="/blog/2020/03/18/openlayers/openlayers学习笔记/" id="post-next" class="post-nav-link">
        <div class="tips">Next <i class="icon icon-angle-right icon-lg icon-pl"></i></div>
        <h4 class="title">openlayers 学习笔记</h4>
      </a>
    </div>
  
</nav>



    

<div class="comments" id="comments">
    <div class="ds-thread" data-thread-key="openlayers/openlayers加载ArcGIS自定义坐标系切片服务" data-title="openlayers加载ArcGIS自定坐标切片服务" data-url="http://windynature.oschina.io/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/"></div>
</div>
<script>
lazyScripts.push('//cdn.bootcss.com/marked/0.3.6/marked.min.js');

var duoshuoQuery = {short_name:'ysblog', theme: 'none'};
lazyScripts.push('//unpkg.com/hexo-theme-material-indigo@1.5.2/js/embed.min.js');


</script>










</article>



</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            <span><a href="/atom.xml" target="_blank" class="rss" title="rss"><i class="icon icon-lg icon-rss"></i></a></span>
            <span>博客内容遵循 <a href="http://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">知识共享 署名 - 非商业性 - 相同方式共享 4.0协议</a></span>
        </p>
    </div>
    <div class="bottom">
        <p>
            <span>Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/yscoder/hexo-theme-indigo" target="_blank">indigo</a></span>
            <span>奔跑的蜗牛 &copy; 2015 - 2020</span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://windynature.oschina.io/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/&title=《openlayers加载ArcGIS自定坐标切片服务》 — 奔跑的蜗牛&pic=http://windynature.oschina.io/img/user2.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://windynature.oschina.io/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/&title=《openlayers加载ArcGIS自定坐标切片服务》 — 奔跑的蜗牛&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://windynature.oschina.io/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《openlayers加载ArcGIS自定坐标切片服务》 — 奔跑的蜗牛&url=http://windynature.oschina.io/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/&via=http://windynature.oschina.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://windynature.oschina.io/2020/03/18/openlayers/openlayers加载ArcGIS自定义坐标系切片服务/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/blog/', SHARE: true, REWARD: false };



</script>

<script src="//unpkg.com/hexo-theme-material-indigo@1.5.2/js/main.min.js"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="//unpkg.com/hexo-theme-material-indigo@1.5.2/js/search.min.js" async></script>






<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>





</body>
</html>
